@import 'variables';

* {
    margin: 0;
    padding: 0;
}
html {
    height: 100%;
}
body {
    height: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
//滚动条的宽度
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
//滚动条的滑块
::-webkit-scrollbar-thumb {
    background-color: #a1a3a9;
    border-radius: 3px;
}
//*,
//*:before,
//*:after {
//    box-sizing: inherit;
//}

a,
a:focus {
    cursor: pointer;
    color: inherit;
    outline: none;
    text-decoration: underline;
}

a:focus,
a:active {
    outline: none;
}
a:hover {
    //text-decoration: underline;
    color: $color-main;
}
div:focus {
    outline: none;
}

.clearfix {
    clear: both !important;
    &:after {
        visibility: hidden;
        display: block;
        font-size: 0;
        content: " ";
        clear: both;
        height: 0;
    }
}

.pull-right {
    float: right!important
}

.pull-left {
    float: left!important
}

.hide {
    display: none!important
}

.show {
    display: block!important
}
.text-left {
    text-align: left !important;
}
.text-center {
    text-align: center !important;
    th,td,input {
        text-align: center !important;
    }
}
.text-right {
    text-align: right !important;
    th,td,input {
        text-align: right !important;
    }
}
.mt-5 { margin-top: 5px; }
.mb-5 { margin-bottom: 5px; }
.ml-5 { margin-left: 5px; }
.mr-5 { margin-right: 5px; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.ml-20 { margin-left: 20px; }
.mr-20 { margin-right: 20px; }
.pl-5 { padding-left: 5px;}
.pr-5 { padding-right: 5px;}
.pt-5 { padding-top: 5px;}
.pb-5 { padding-bottom: 5px;}
.margin-none {margin: 0 !important;}
.padding-none {padding: 0 !important;}

.bg-primary { background-color: $color-main !important; }
.bg-success { background-color: $color-success !important; }
.bg-warning { background-color: $color-warning !important; }
.bg-danger { background-color: $color-danger !important; }
.bg-info { background-color: $color-info !important; }

.color-primary { color: $color-main !important; }
.color-success { color: $color-success !important; }
.color-warning { color: $color-warning !important; }
.color-danger { color: $color-danger !important; }
.color-info { color: $color-info !important; }

.size-12 {font-size: 12px;}
.size-14 {font-size: 14px;}

// 闪烁动画
@keyframes flashing{
    0%{opacity: 1;}
    100%{opacity: 0;}
}
/* 添加兼容性前缀 */
@-webkit-keyframes flashing {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
@-moz-keyframes flashing {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
@-ms-keyframes flashing {
    0% {opacity: 1; }
    100% { opacity: 0;}
}
@-o-keyframes flashing {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* 定义flashing类*/
.flashing{
    animation: flashing 1s linear infinite;
    /* 其它浏览器兼容性前缀 */
    -webkit-animation: flashing 1s linear infinite;
    -moz-animation: flashing 1s linear infinite;
    -ms-animation: flashing 1s linear infinite;
    -o-animation: flashing 1s linear infinite;
}

.el-divider--horizontal { margin: 12px 0 !important; }
.el-dialog {margin-top: 1vh !important;}
.el-dialog--center .el-dialog__body { padding-bottom: 40px !important; }
// dialog动画
.el-dialog__wrapper {
    transition-duration: 0.3s;
}
.dialog-fade-enter-active{
    animation: none !important;
}
.dialog-fade-leave-active {
    transition-duration: 0.15s !important;
    animation: none !important;
}
.dialog-fade-enter-active .el-dialog,
.dialog-fade-leave-active .el-dialog{
    animation-fill-mode: forwards;
}
.dialog-fade-enter-active .el-dialog{
    animation-duration: 0.3s;
    animation-name: anim-open;
    animation-timing-function: cubic-bezier(0.6,0,0.4,1);
}
.dialog-fade-leave-active .el-dialog{
    animation-duration: 0.3s;
    animation-name: anim-close;
}
@keyframes anim-open {
    0% { opacity: 0;  transform: scale3d(0, 0, 1); }
    100% { opacity: 1; transform: scale3d(1, 1, 1); }
}
@keyframes anim-close {
    0% { opacity: 1; }
    100% { opacity: 0; transform: scale3d(0.5, 0.5, 1); }
}

.el-table td {
    padding: 5px 0 !important;
}
.el-input-number--small {
    width: 150px !important;
}
// 统一mini样式 input 和 textarea 高度
.el-input--mini {
    .el-textarea__inner {
        padding: 4px 15px;
    }
}
.el-dialog__body > div {
    margin-bottom: 30px;
}
.el-drawer__body {
    overflow: auto;
}

body .el-table th.gutter {
    display: table-cell !important;
}
body .el-table th {
    background: #eee;
}
// 控制器在右侧的输入框 移除padding
.el-input-number.is-controls-right .el-input__inner {
    padding-left: 0 !important;
    padding-right: 28px !important;
    text-align: center;
}

// 修复 vxe-table 使用fixed=left时列可能空白的问题
.vxe-table--render-default .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper {
    width: unset !important;
}

// 半屏需求
@media screen and (max-width: 1366px) {
    .el-dialog__wrapper .el-dialog {width: 95% !important; margin-top: 1vh !important;}
    .el-dialog__wrapper .el-dialog .el-dialog__body {overflow: auto}
}
// 左侧菜单
@media screen and (max-width: 768px) {
    .el-menu--vertical {
        overflow-y: auto;
        top: 0;
        max-height: 99vh;
    }
    .el-message {min-width: 300px !important;}
    .el-message-box {width: 300px !important;}
    // router-tab
    .router-tab__container {
        margin: 5px 10px !important;
    }
    // vxe-modal
    .vxe-modal--box {
        width: 414px !important;
    }
    // el-drawer
    .el-drawer.rtl {
        min-width: 60% !important;
    }
}

#app {
    height: 100%;
    .header-container {
        background: #E9EEF3;
        .el-header {
            background: #FFF;
            //background-color: $color-main;
            //color: #FFFFFF;
            //text-align: center;
            height: 50px;
            line-height: 50px;
            box-shadow: 0 0 4px 0 #304156;
            border-bottom: 1px solid #eee;
            box-shadow: 0 0 8px rgba(0,0,0,.2);
        }
    }


    .el-aside {
        background-color: #304156;
        height: 100%;
        //color: #FFFFFF;
        //text-align: center;

        .el-scrollbar {
            height: 100%;

            .el-scrollbar__wrap {
                overflow-x: hidden !important;
            }
            .el-menu {
                border-right: none;
                & > .el-menu-item:first-child {
                    height: 35px;
                    line-height: 35px;
                }
                // 调整菜单高度
                .el-submenu {
                    .el-submenu__title {
                        height: 35px;
                        line-height: 35px;
                    }
                    .el-menu-item {
                        height: 30px;
                        line-height: 30px;
                    }
                }

            }
            .el-menu--collapse {
                width: 64px;
            }
        }
    }

    .el-main {
        padding: 0;

        .router-tab__header {
            .router-tab__item {
                margin: 5px;
                padding: 0 10px;
                color: #909399;
                background: #f4f4f5;
                border: 1px solid #e9e9eb;
                //border-radius: 3px;
                height: 25px;
                line-height: 25px;
                box-shadow: 1px 1px 0 0 #a9a9a9;

                .router-tab__item-title {
                    font-size: 12px;
                    max-width: unset;
                    overflow: unset;
                }
            }
            .router-tab__item.is-active, .router-tab__item:hover {
                //color: white;
                background-color: #ecf5ff;
                color: #409eff;
                border: 1px solid #d9ecff;
            }
        }
        .router-tab__container {
            margin: 10px 15px;
        }
    }

    body > .el-container {
        margin-bottom: 40px;
    }

    .filter-container {
        background: #FFF;
        .filter-item {
            display: inline-block;
            vertical-align: middle;
            margin-bottom: 10px;
        }
    }

    .header-container {
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
        margin-bottom: 5px;
    }
    //.main-container {
    //    min-height: 100%;
    //}
    .el-pagination {
        margin-top: 10px;
    }
    .el-form-item {
        margin-bottom: 22px;
    }
}
